<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script>
      /* 
打印99乘法表
1*1=1
1*2=2 2*2=4
1*3=3 2*3=6 3*3=9
             ...9*9=81
*/
      // 创建外层循环，用来控制乘法表的高度
      for (var i = 1; i <= 9; i++) {
        // 创建内层循环，控制图形的宽度
        for (var j = 1; j <= i; j++) {
          document.write("<span>" + j + "*" + i + "=" + i * j + "</span>");
        }
        document.write("<br/>");
      }
    </script>
    <style>
      span {
        display: inline-block;
        width: 80px;
      }
    </style>
  </head>
  <body></body>
</html>
